package com.zx.pm.service.impl;

import java.util.List;
import com.zx.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zx.pm.mapper.ImplementationProjectMapper;
import com.zx.pm.domain.ImplementationProject;
import com.zx.pm.service.IImplementationProjectService;

/**
 * 实施项目信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-08
 */
@Service
public class ImplementationProjectServiceImpl implements IImplementationProjectService
{
    @Autowired
    private ImplementationProjectMapper implementationProjectMapper;

    /**
     * 查询实施项目信息
     *
     * @param id 实施项目信息主键
     * @return 实施项目信息
     */
    @Override
    public ImplementationProject selectImplementationProjectById(Long id)
    {
        return implementationProjectMapper.selectImplementationProjectById(id);
    }

    /**
     * 查询实施项目信息列表
     *
     * @param implementationProject 实施项目信息
     * @return 实施项目信息
     */
    @Override
    public List<ImplementationProject> selectImplementationProjectList(ImplementationProject implementationProject)
    {
        return implementationProjectMapper.selectImplementationProjectList(implementationProject);
    }

    /**
     * 新增实施项目信息
     *
     * @param implementationProject 实施项目信息
     * @return 结果
     */
    @Override
    public int insertImplementationProject(ImplementationProject implementationProject)
    {
        implementationProject.setCreateTime(DateUtils.getNowDate());
        return implementationProjectMapper.insertImplementationProject(implementationProject);
    }

    /**
     * 修改实施项目信息
     *
     * @param implementationProject 实施项目信息
     * @return 结果
     */
    @Override
    public int updateImplementationProject(ImplementationProject implementationProject)
    {
        implementationProject.setUpdateTime(DateUtils.getNowDate());
        return implementationProjectMapper.updateImplementationProject(implementationProject);
    }

    /**
     * 批量删除实施项目信息
     *
     * @param ids 需要删除的实施项目信息主键
     * @return 结果
     */
    @Override
    public int deleteImplementationProjectByIds(Long[] ids)
    {
        return implementationProjectMapper.deleteImplementationProjectByIds(ids);
    }

    /**
     * 删除实施项目信息信息
     *
     * @param id 实施项目信息主键
     * @return 结果
     */
    @Override
    public int deleteImplementationProjectById(Long id)
    {
        return implementationProjectMapper.deleteImplementationProjectById(id);
    }
}
